home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14405 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  742 b 

  1. Path: news.oanet.com!dialin3
  2. From: scorpion@portal.connect.ab.ca
  3. Newsgroups: comp.lang.c
  4. Subject: How can you make this work?
  5. Date: Sun, 14 Apr 96 13:11:08 GMT
  6. Organization: Central News Services
  7. Message-ID: <4kr886$13t@hermes.oanet.com>
  8. NNTP-Posting-Host: dialin3.connect.ab.ca
  9. Summary: How can you make this work?
  10. X-Newsreader: News Xpress Version 1.0 Beta #4
  11.  
  12.     I need to know why this gives an 'Illegal Pointer 
  13. Arithmetic' error ; It's supposed to be a pixel write routine:
  14.  
  15. void putpixel(short x,short y,unsigned char colour)
  16. {    char far *Startofvidmem;
  17.     char far *Location; /* Address of where to write the 
  18. pixel*/
  19.     Startofvidmem = 0xA000;
  20.  
  21.     Location = Startofvidmem + (y*320) + x;
  22.     *Location = colour;
  23. }
  24.  
  25.     Thanx in advance!
  26. John Smith
  27.